package com.cn.server;

import com.cn.server.tcp.Server;
import com.cn.server.websocket.WebSocketServer;

/**
 * 启动类
 */
public class Bootstrap {

    private int webSocketPort = 10103;
    private int tcpSocketPort = 10102;

    public Bootstrap(int webSocketPort, int tcpSocketPort) {
        this.webSocketPort = webSocketPort;
        this.tcpSocketPort = tcpSocketPort;
    }

    public void start() {
        WebSocketServer webSocketServer = new WebSocketServer();
        webSocketServer.setPort(webSocketPort).registerHandlers().start();
        Server server = new Server();
        server.setPort(tcpSocketPort).registerHandlers().start();
    }
}
